#include <sysregs.h>
#include <cpu.h>
#include <plat.h>
#include <wfi.h>

/* mpidr_el1的定义cortex-a的每个处理器都会不一样，且需考虑多个cluster */
uint64_t cpu_id_to_mpidr(uint64_t id)
{

}

int64_t cpu_mpidr_to_id(uint64_t mpidr)
{
}

void cpu_arch_init(void)
{
    uint64_t val;

    /* Enable floating point */
    val = MRS(CPACR_El1);
    val |= CPACR_EL1_FPEN(CPACR_EL1_FP_TRAP_NONE);
    MSR(CPACR_El1, val);
}

void cpu_arch_idle(void)
{
    while(1)
        wfi();
}
